package com.bsoft.gol.hcs.specialist.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;

/**
 * 处方（用药）记录表
 * @author lanyu
 * @date 2021年10月14日 10:02
 */
@Entity
@Table(name = "prescription_record")
public class PrescriptionRecordEntity {
    /**
     * 处方记录id
     */
    private String prescriptionRecordId;
    /**
     * 就诊医疗机构组织机构代码
     */
    private String visitOrganization;
    /**
     * 就诊机构名称
     */
    private String visitOrganizationName;
    /**
     * 业务类型代码 1门诊、2住院
     */
    private String businessType;
    /**
     * 业务记录号
     */
    private String businessId;
    /**
     * 身份证件类别代码
     */
    private String idCardCode;
    /**
     * 身份证件号码
     */
    private String idCard;
    /**
     * 处方开立日期
     */
    private Date prescriptionDate;
    /**
     * 患者姓名
     */
    private String name;
    /**
     * 患者性别代码
     */
    private String sex;
    /**
     * 患者电话号码
     */
    private String patientPhone;
    /**
     * 诊疗卡类型，参照字典CVX_CardType
     */
    private String medicalCardType;
    /**
     * 诊疗卡号
     */
    private String medicalCardId;
    /**
     * 科室代码
     */
    private String visitDeptId;
    /**
     * 科室名称
     */
    private String visitDeptName;
    /**
     * 处方开立医师
     */
    private String prescriptionDoctor;
    /**
     * 临床诊断
     */
    private String clinicalDiagnose;
    /**
     * 地址
     */
    private String address;
    /**
     * 药物类型代码
     */
    private String drugType;
    /**
     * 就诊流水号
     */
    private String visitId;
    /**
     * 门（急）诊号
     */
    private String clinicId;
    /**
     * 住院号
     */
    private String hospizationId;
    /**
     * 药品明细序号
     */
    private String drugDetailId;
    /**
     * 药物名称
     */
    private String drugName;
    /**
     * 药品产地id
     */
    private String drugProductionPlaceId;
    /**
     * 药品产地
     */
    private String drugProductionPlace;
    /**
     * 药物规格
     */
    private String drugSpecifications;
    /**
     * 药品、药房单位
     */
    private String drugStoreUnit;
    /**
     * 药品单价
     */
    private Integer drugUnitPrice;
    /**
     * 默认一次剂量
     */
    private String defaultOnceDosage;
    /**
     * 一次剂量
     */
    private String onceDosage;
    /**
     * 剂量单位
     */
    private String dosageUnit;
    /**
     * 药物发放数量
     */
    private Integer medicineNumber;
    /**
     * 药品-用药天数
     */
    private Integer medicineDays;
    /**
     * 药物使用频次代码
     */
    private String drugUsingRate;
    /**
     * 药物使用途径代码
     */
    private String drugUsePathwaysCode;
    /**
     * 药物用法名称
     */
    private String drugUsePathwaysName;
    /**
     * 使用频次名称
     */
    private String drugUsingRateName;
    /**
     * 代煎标志
     */
    private String boilSign;
    /**
     * 药品煎法名称
     */
    private String herbalMedicineDecoctionName;
    /**
     * 草药脚注
     */
    private String herbalFootnote;
    /**
     * 中药饮片剂数
     */
    private Integer piecesChineseMedicineAgentNumb;
    /**
     * 处方药品组号
     */
    private Integer drugsGroupNumber;
    /**
     * 备注信息
     */
    private String remark;
    /**
     * 药品顺序号
     */
    private Integer sortNumber;

    /**
     * 删除标志
     */
    private String deleteFlag;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 修改时间
     */
    private Timestamp modifyTime;

    @Id
    @Column(name = "prescription_record_id")
    public String getPrescriptionRecordId() {
        return prescriptionRecordId;
    }

    public void setPrescriptionRecordId(String prescriptionRecordId) {
        this.prescriptionRecordId = prescriptionRecordId;
    }

    @Basic
    @Column(name = "visit_organization")
    public String getVisitOrganization() {
        return visitOrganization;
    }

    public void setVisitOrganization(String visitOrganization) {
        this.visitOrganization = visitOrganization;
    }

    @Basic
    @Column(name = "visit_organization_name")
    public String getVisitOrganizationName() {
        return visitOrganizationName;
    }

    public void setVisitOrganizationName(String visitOrganizationName) {
        this.visitOrganizationName = visitOrganizationName;
    }
    @Basic
    @Column(name = "business_type")
    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }
    @Basic
    @Column(name = "business_id")
    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }
    @Basic
    @Column(name = "id_card_code")
    public String getIdCardCode() {
        return idCardCode;
    }

    public void setIdCardCode(String idCardCode) {
        this.idCardCode = idCardCode;
    }

    @Basic
    @Column(name = "id_card")
    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    @Basic
    @Column(name = "prescription_date")
    public Date getPrescriptionDate() {
        return prescriptionDate;
    }

    public void setPrescriptionDate(Date prescriptionDate) {
        this.prescriptionDate = prescriptionDate;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "sex")
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "patient_phone")
    public String getPatientPhone() {
        return patientPhone;
    }

    public void setPatientPhone(String patientPhone) {
        this.patientPhone = patientPhone;
    }

    @Basic
    @Column(name = "medical_card_type")
    public String getMedicalCardType() {
        return medicalCardType;
    }

    public void setMedicalCardType(String medicalCardType) {
        this.medicalCardType = medicalCardType;
    }

    @Basic
    @Column(name = "medical_card_id")
    public String getMedicalCardId() {
        return medicalCardId;
    }

    public void setMedicalCardId(String medicalCardId) {
        this.medicalCardId = medicalCardId;
    }

    @Basic
    @Column(name = "visit_dept_id")
    public String getVisitDeptId() {
        return visitDeptId;
    }

    public void setVisitDeptId(String visitDeptId) {
        this.visitDeptId = visitDeptId;
    }

    @Basic
    @Column(name = "visit_dept_name")
    public String getVisitDeptName() {
        return visitDeptName;
    }

    public void setVisitDeptName(String visitDeptName) {
        this.visitDeptName = visitDeptName;
    }

    @Basic
    @Column(name = "prescription_doctor")
    public String getPrescriptionDoctor() {
        return prescriptionDoctor;
    }

    public void setPrescriptionDoctor(String prescriptionDoctor) {
        this.prescriptionDoctor = prescriptionDoctor;
    }

    @Basic
    @Column(name = "clinical_diagnose")
    public String getClinicalDiagnose() {
        return clinicalDiagnose;
    }

    public void setClinicalDiagnose(String clinicalDiagnose) {
        this.clinicalDiagnose = clinicalDiagnose;
    }

    @Basic
    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "drug_type")
    public String getDrugType() {
        return drugType;
    }

    public void setDrugType(String drugType) {
        this.drugType = drugType;
    }

    @Basic
    @Column(name = "visit_id")
    public String getVisitId() {
        return visitId;
    }

    public void setVisitId(String visitId) {
        this.visitId = visitId;
    }

    @Basic
    @Column(name = "clinic_id")
    public String getClinicId() {
        return clinicId;
    }

    public void setClinicId(String clinicId) {
        this.clinicId = clinicId;
    }

    @Basic
    @Column(name = "hospization_id")
    public String getHospizationId() {
        return hospizationId;
    }

    public void setHospizationId(String hospizationId) {
        this.hospizationId = hospizationId;
    }

    @Basic
    @Column(name = "drug_detail_id")
    public String getDrugDetailId() {
        return drugDetailId;
    }

    public void setDrugDetailId(String drugDetailId) {
        this.drugDetailId = drugDetailId;
    }

    @Basic
    @Column(name = "drug_name")
    public String getDrugName() {
        return drugName;
    }

    public void setDrugName(String drugName) {
        this.drugName = drugName;
    }

    @Basic
    @Column(name = "drug_production_place_id")
    public String getDrugProductionPlaceId() {
        return drugProductionPlaceId;
    }

    public void setDrugProductionPlaceId(String drugProductionPlaceId) {
        this.drugProductionPlaceId = drugProductionPlaceId;
    }

    @Basic
    @Column(name = "drug_production_place")
    public String getDrugProductionPlace() {
        return drugProductionPlace;
    }

    public void setDrugProductionPlace(String drugProductionPlace) {
        this.drugProductionPlace = drugProductionPlace;
    }

    @Basic
    @Column(name = "drug_specifications")
    public String getDrugSpecifications() {
        return drugSpecifications;
    }

    public void setDrugSpecifications(String drugSpecifications) {
        this.drugSpecifications = drugSpecifications;
    }

    @Basic
    @Column(name = "drug_store_unit")
    public String getDrugStoreUnit() {
        return drugStoreUnit;
    }

    public void setDrugStoreUnit(String drugStoreUnit) {
        this.drugStoreUnit = drugStoreUnit;
    }

    @Basic
    @Column(name = "drug_unit_price")
    public Integer getDrugUnitPrice() {
        return drugUnitPrice;
    }

    public void setDrugUnitPrice(Integer drugUnitPrice) {
        this.drugUnitPrice = drugUnitPrice;
    }

    @Basic
    @Column(name = "default_once_dosage")
    public String getDefaultOnceDosage() {
        return defaultOnceDosage;
    }

    public void setDefaultOnceDosage(String defaultOnceDosage) {
        this.defaultOnceDosage = defaultOnceDosage;
    }

    @Basic
    @Column(name = "once_dosage")
    public String getOnceDosage() {
        return onceDosage;
    }

    public void setOnceDosage(String onceDosage) {
        this.onceDosage = onceDosage;
    }

    @Basic
    @Column(name = "dosage_unit")
    public String getDosageUnit() {
        return dosageUnit;
    }

    public void setDosageUnit(String dosageUnit) {
        this.dosageUnit = dosageUnit;
    }

    @Basic
    @Column(name = "medicine_number")
    public Integer getMedicineNumber() {
        return medicineNumber;
    }

    public void setMedicineNumber(Integer medicineNumber) {
        this.medicineNumber = medicineNumber;
    }

    @Basic
    @Column(name = "medicine_days")
    public Integer getMedicineDays() {
        return medicineDays;
    }

    public void setMedicineDays(Integer medicineDays) {
        this.medicineDays = medicineDays;
    }

    @Basic
    @Column(name = "drug_using_rate")
    public String getDrugUsingRate() {
        return drugUsingRate;
    }

    public void setDrugUsingRate(String drugUsingRate) {
        this.drugUsingRate = drugUsingRate;
    }

    @Basic
    @Column(name = "drug_use_pathways_code")
    public String getDrugUsePathwaysCode() {
        return drugUsePathwaysCode;
    }

    public void setDrugUsePathwaysCode(String drugUsePathwaysCode) {
        this.drugUsePathwaysCode = drugUsePathwaysCode;
    }

    @Basic
    @Column(name = "drug_use_pathways_name")
    public String getDrugUsePathwaysName() {
        return drugUsePathwaysName;
    }

    public void setDrugUsePathwaysName(String drugUsePathwaysName) {
        this.drugUsePathwaysName = drugUsePathwaysName;
    }

    @Basic
    @Column(name = "drug_using_rate_name")
    public String getDrugUsingRateName() {
        return drugUsingRateName;
    }

    public void setDrugUsingRateName(String drugUsingRateName) {
        this.drugUsingRateName = drugUsingRateName;
    }

    @Basic
    @Column(name = "boil_sign")
    public String getBoilSign() {
        return boilSign;
    }

    public void setBoilSign(String boilSign) {
        this.boilSign = boilSign;
    }

    @Basic
    @Column(name = "herbal_medicine_decoction_name")
    public String getHerbalMedicineDecoctionName() {
        return herbalMedicineDecoctionName;
    }

    public void setHerbalMedicineDecoctionName(String herbalMedicineDecoctionName) {
        this.herbalMedicineDecoctionName = herbalMedicineDecoctionName;
    }

    @Basic
    @Column(name = "herbal_footnote")
    public String getHerbalFootnote() {
        return herbalFootnote;
    }

    public void setHerbalFootnote(String herbalFootnote) {
        this.herbalFootnote = herbalFootnote;
    }

    @Basic
    @Column(name = "pieces_chinese_medicine_agent_numb")
    public Integer getPiecesChineseMedicineAgentNumb() {
        return piecesChineseMedicineAgentNumb;
    }

    public void setPiecesChineseMedicineAgentNumb(Integer piecesChineseMedicineAgentNumb) {
        this.piecesChineseMedicineAgentNumb = piecesChineseMedicineAgentNumb;
    }

    @Basic
    @Column(name = "drugs_group_number")
    public Integer getDrugsGroupNumber() {
        return drugsGroupNumber;
    }

    public void setDrugsGroupNumber(Integer drugsGroupNumber) {
        this.drugsGroupNumber = drugsGroupNumber;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "sort_number")
    public Integer getSortNumber() {
        return sortNumber;
    }

    public void setSortNumber(Integer sortNumber) {
        this.sortNumber = sortNumber;
    }

    @Basic
    @Column(name = "delete_flag")
    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "modify_time")
    public Timestamp getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Timestamp modifyTime) {
        this.modifyTime = modifyTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PrescriptionRecordEntity that = (PrescriptionRecordEntity) o;
        return Objects.equals(prescriptionRecordId, that.prescriptionRecordId) && Objects.equals(visitOrganization, that.visitOrganization) && Objects.equals(visitOrganizationName, that.visitOrganizationName) && Objects.equals(idCardCode, that.idCardCode) && Objects.equals(idCard, that.idCard) && Objects.equals(prescriptionDate, that.prescriptionDate) && Objects.equals(name, that.name) && Objects.equals(sex, that.sex) && Objects.equals(patientPhone, that.patientPhone) && Objects.equals(medicalCardType, that.medicalCardType) && Objects.equals(medicalCardId, that.medicalCardId) && Objects.equals(visitDeptId, that.visitDeptId) && Objects.equals(visitDeptName, that.visitDeptName) && Objects.equals(prescriptionDoctor, that.prescriptionDoctor) && Objects.equals(clinicalDiagnose, that.clinicalDiagnose) && Objects.equals(address, that.address) && Objects.equals(drugType, that.drugType) && Objects.equals(visitId, that.visitId) && Objects.equals(clinicId, that.clinicId) && Objects.equals(hospizationId, that.hospizationId) && Objects.equals(drugDetailId, that.drugDetailId) && Objects.equals(drugName, that.drugName) && Objects.equals(drugProductionPlaceId, that.drugProductionPlaceId) && Objects.equals(drugProductionPlace, that.drugProductionPlace) && Objects.equals(drugSpecifications, that.drugSpecifications) && Objects.equals(drugStoreUnit, that.drugStoreUnit) && Objects.equals(drugUnitPrice, that.drugUnitPrice) && Objects.equals(defaultOnceDosage, that.defaultOnceDosage) && Objects.equals(onceDosage, that.onceDosage) && Objects.equals(dosageUnit, that.dosageUnit) && Objects.equals(medicineNumber, that.medicineNumber) && Objects.equals(medicineDays, that.medicineDays) && Objects.equals(drugUsingRate, that.drugUsingRate) && Objects.equals(drugUsePathwaysCode, that.drugUsePathwaysCode) && Objects.equals(drugUsePathwaysName, that.drugUsePathwaysName) && Objects.equals(drugUsingRateName, that.drugUsingRateName) && Objects.equals(boilSign, that.boilSign) && Objects.equals(herbalMedicineDecoctionName, that.herbalMedicineDecoctionName) && Objects.equals(herbalFootnote, that.herbalFootnote) && Objects.equals(piecesChineseMedicineAgentNumb, that.piecesChineseMedicineAgentNumb) && Objects.equals(drugsGroupNumber, that.drugsGroupNumber) && Objects.equals(remark, that.remark) && Objects.equals(sortNumber, that.sortNumber) && Objects.equals(createTime, that.createTime) && Objects.equals(modifyTime, that.modifyTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(prescriptionRecordId, visitOrganization, visitOrganizationName, idCardCode, idCard, prescriptionDate, name, sex, patientPhone, medicalCardType, medicalCardId, visitDeptId, visitDeptName, prescriptionDoctor, clinicalDiagnose, address, drugType, visitId, clinicId, hospizationId, drugDetailId, drugName, drugProductionPlaceId, drugProductionPlace, drugSpecifications, drugStoreUnit, drugUnitPrice, defaultOnceDosage, onceDosage, dosageUnit, medicineNumber, medicineDays, drugUsingRate, drugUsePathwaysCode, drugUsePathwaysName, drugUsingRateName, boilSign, herbalMedicineDecoctionName, herbalFootnote, piecesChineseMedicineAgentNumb, drugsGroupNumber, remark, sortNumber, createTime, modifyTime);
    }
}
